package com.nervenets.web.controller.admin;

import com.nervenets.Global;
import com.nervenets.web.controller.TokenParams;
import com.nervenets.web.enumeration.Role;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;

@EqualsAndHashCode(callSuper = true)
@Data
public class ManagerEditParams extends TokenParams {
    @ApiModelProperty(value = "管理员账号ID，不填是为新建")
    private long adminId;
    @ApiModelProperty(value = "商户登录手机，不传不能登录", required = true)
    @Pattern(regexp = Global.RegExp.MOBILE, message = "请输入正确的手机号码")
    private String mobile;
    @ApiModelProperty(value = "商户登录密码，不传不能登录")
    private String password;
    @ApiModelProperty(value = "权限", required = true)
    private Role role;
    @ApiModelProperty(value = "名称", required = true)
    @NotNull(message = "名称不能为空")
    private String name;
    @ApiModelProperty(value = "联系人")
    @NotNull(message = "联系人不能为空")
    private String contactName;
    @ApiModelProperty(value = "联系人电话")
    private String contactMobile;
    @ApiModelProperty(value = "团队LOGO", required = true)
    @NotNull(message = "团队LOGO不能为空")
    private String logo;
    @ApiModelProperty(value = "团队名片LOGO", required = true)
    @NotNull(message = "团队名片LOGO不能为空")
    private String cardLogo;
    @ApiModelProperty(value = "封面图", required = true)
    @NotNull(message = "封面图不能为空")
    private String coverImage;
    @ApiModelProperty(value = "分享封面图", required = true)
    @NotNull(message = "分享封面图不能为空")
    private String shareImage;
    @ApiModelProperty(value = "试用时长（天）", required = true)
    @Positive(message = "试用时长必须为正整数")
    private int freeDays;
    @ApiModelProperty(value = "价格（单位：分）", required = true)
    @Positive(message = "价格不能为空")
    private int price;
    @ApiModelProperty(value = "简介")
    private String intro;
}
